package com.yami.shop.personnft.common.service.impl;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yami.shop.personnft.common.dao.TransferApplyRecordMapper;
import com.yami.shop.personnft.common.model.TransferApplyRecord;
import com.yami.shop.personnft.common.service.TransferApplyService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@Slf4j
public class TransferApplyServiceImpl implements TransferApplyService {
    @Autowired
    private TransferApplyRecordMapper transferApplyRecordMapper;
    @Override
    public void save(TransferApplyRecord transferApplyRecord) {
        transferApplyRecordMapper.save(transferApplyRecord);
    }

    @Override
    public void updateByPrimaryKeySelective(TransferApplyRecord transferApplyRecord) {
        transferApplyRecordMapper.updateByPrimaryKeySelective(transferApplyRecord);
    }

    @Override
    public TransferApplyRecord selectById(String id) {
        return transferApplyRecordMapper.selectById(id);
    }

    @Override
    public List<TransferApplyRecord> selectList(TransferApplyRecord transferApplyRecord) {
        return transferApplyRecordMapper.selectList(transferApplyRecord);
    }

    @Override
    public TransferApplyRecord selectIntoStautsByBatchId(String batchId) {
        return transferApplyRecordMapper.selectIntoStautsByBatchId(batchId);
    }

    @Override
    public TransferApplyRecord selectIntoStautsByAppId(String appId) {
        return transferApplyRecordMapper.selectIntoStautsByAppId(appId);
    }

    @Override
    public void updateIntoStautsByBatchId(String batchId, Integer status, String msg, Integer times) {
        transferApplyRecordMapper.updateIntoStautsByBatchId(batchId,status,msg,times);
    }

    @Override
    public void updateBatch(List<TransferApplyRecord> list) {
        transferApplyRecordMapper.updateBatch(list);
    }
    @Override
    public IPage<TransferApplyRecord> page(Page page, TransferApplyRecord transferApplyRecord) {
        IPage<TransferApplyRecord> doPage = transferApplyRecordMapper.selectPageList(page,transferApplyRecord);
        return doPage;
    }
}
